<template>
  <m-page>
    <!-- 申请结果 -->
    <m-header title="申请结果"></m-header>
    <div class="apply_result">
      <!-- 申请结果成功页 -->
      <div class="result_success" v-if="isResult === '0'">
        <div class="img_box"></div>
        <p>申请借款成功</p>
        <ynet-cell-item title="申请金额" addon="1万元"></ynet-cell-item>
        <ynet-cell-item title="申请期限" addon="3天"></ynet-cell-item>
        <ynet-cell-item title="手续费用" addon="7.5元"></ynet-cell-item>
        <ynet-cell-item title="账单日" addon="每月18日"></ynet-cell-item>
        <ynet-cell-item title="本金到期" addon="2020年02月13日" class="red"></ynet-cell-item>

        <div class="tips">
          <p>温馨提示：建议在每月7日之前归还上月账单金额</p>
        </div>
        <ynet-button type="warning" @click="gotoWithdrawMoney">立即提现</ynet-button>
        <ynet-button type="default" @click="goback">完成</ynet-button>
      </div>
      <!-- 申请结果失败页 -->
      <div class="result_fail" v-if="isResult === '1'">
        <div class="img_box"></div>
        <p>对不起，申请失败！</p>
        <p class="fail_msg">由于网络原因，本次融易通卡申请用款失败，请您排查问题后重新尝试。</p>
        <ynet-button type="warning" @click="reApply()">重新申请</ynet-button>
        <ynet-button type="default" @click="goback()">返回</ynet-button>
      </div>
      <!-- 审核中页面 -->
      <div class="result_ing" v-if="isResult === '2'">
        <div class="img_box"></div>
        <p>审核中</p>
        <p class="fail_msg">您的用款申请正在审核中，预计10分钟后将会短信通知您审核结果，请耐心等待</p>
        <ynet-cell-item title="申请金额" addon="1万元"></ynet-cell-item>
        <ynet-cell-item title="剩余额度" addon="60万元"></ynet-cell-item>
        <ynet-button type="warning" @click="goback">我知道了</ynet-button>
      </div>
    </div>
  </m-page>
</template>

<script>
import { CellItem, Button } from "ynet-mobile";
import { goto } from "../utils/index";
export default {
  components: {
    [CellItem.name]: CellItem,
    [Button.name]: Button
  },
  data() {
    return {
      isResult: "0" // 0为申请成功页  1为申请失败页 2为审核中
    };
  },
  created() {},
  mounted() {},
  methods: {
    //重新申请按钮 && 继续申请按钮
    //点击跳转至申请信息录入页
    reApply() {
      goto("apply_information.html");
    },
    //返回 && 完成按钮
    //点击回融易通卡主页
    goback() {
      goto("home_card_information.html");
    },
    //立即提现按钮
    //点击进入立即提现页
    gotoWithdrawMoney() {
      goto("withdraw_information.html");
    }
  },
  watch: {},
  computed: {}
};
</script>

<style lang="scss" scoped>
@import "./index.scss";
</style>

